package com.huawei.m2m.cig.decoder.hzousonghua.wzousonghua.generate.cloud;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.huawei.m2m.cig.decoder.protocol.NBMessage;
import com.huawei.m2m.cig.decoder.protocol.OutputBuffer;

public class down extends NBMessage {
	public down() {
		setName("down");
		setMessageId(112);
		setType("cloudReq");
	}

	private int messageId = 112;
	private String value;

	public int getMessageId() {
		return this.messageId;
	}

	public void setMessageId(int paramInt) {
		this.messageId = paramInt;
	}

	public String getValue() {
		return this.value;
	}

	public void setValue(String paramString) {
		this.value = paramString;
	}

	public void encode(OutputBuffer paramOutputBuffer) {
		paramOutputBuffer.putByte(this.messageId);
		paramOutputBuffer.putString(this.value, "UTF-8");
	}

	public void configJsonNode(ObjectNode paramObjectNode) throws Exception {
		JsonNode localJsonNode1 = paramObjectNode.get("paras");

		JsonNode localJsonNode2 = localJsonNode1.get("value");
		if (localJsonNode2 != null) {
			setMessageId(localJsonNode2.asInt());
		}
	}
}
